package com.jdd.enterprise.api.controller.admin;

//import com.jdd.common.base.container.PageRequest;
import com.jdd.enterprise.api.dto.PageRequest;
import com.jdd.enterprise.api.vo.ApiResponse;
import com.jdd.enterprise.api.vo.PageResponse;
import com.jdd.enterprise.domain.entity.CookingMethod;
import com.jdd.enterprise.domain.service.CookingMethodService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("cooking_method")
@CrossOrigin
public class CookingMethodController {
    @Autowired
    private CookingMethodService cookingMethodService;



    @PostMapping("showList")

    public ApiResponse<PageResponse<CookingMethod>>  showList(@RequestBody PageRequest<CookingMethod> request){
        PageResponse<CookingMethod> cookingMethodPageResponse = cookingMethodService.showList(request);

        return  ApiResponse.success(cookingMethodPageResponse);

    }




}
